package org.qs.webservice.filter;

import org.apache.log4j.Level;  
import org.apache.log4j.Logger;  
import org.apache.log4j.net.SyslogAppender; 

/**
 * 
 * @ClassName: CustomerLog 
 * @author xusaike 
 * @date 2015年11月11日 上午9:35:37 
 *
 */
public class CustomerLog {    
    
    /** 
     * 继承Level 
     * @author Sevencm 
     * 
     */  
    @SuppressWarnings("serial")
	private static class CustomerLogLevel extends Level{  
        public CustomerLogLevel(int level, String levelStr, int syslogEquivalent) {  
            super(level, levelStr, syslogEquivalent);  
        }         
    }  
      
    /** 
     * 自定义级别名称，以及级别范围 
     */  
    private static final Level CustomerLevel = new CustomerLogLevel(20050,"CUSTOMER",SyslogAppender.LOG_LOCAL0); 
    private static final Level ReadLevel = new CustomerLogLevel(20150,"READ",SyslogAppender.LOG_LOCAL0);
    private static final Level OrderLevel = new CustomerLogLevel(20250,"ORDER",SyslogAppender.LOG_LOCAL0);
    private static final Level IMPAYLevel = new CustomerLogLevel(20450,"IMPAY",SyslogAppender.LOG_LOCAL0);
    private static final Level GAMELevel = new CustomerLogLevel(20550,"GAME",SyslogAppender.LOG_LOCAL0);
    private static final Level IntercutLevel = new CustomerLogLevel(20350,"INTERCUT",SyslogAppender.LOG_LOCAL0);
    
    /** 
     * 使用日志打印logger中的log方法 
     *  
     * @param logger 
     * @param objLogInfo 
     */  
    public static void customerLog(Logger logger,Object objLogInfo){  
        logger.log(CustomerLevel, objLogInfo);  
    }
    public static void readLog(Logger logger,Object objLogInfo){  
        logger.log(ReadLevel, objLogInfo);  
    }
    public static void orderLog(Logger logger,Object objLogInfo){  
        logger.log(OrderLevel, objLogInfo);  
    }
    public static void IntercutLog(Logger logger,Object objLogInfo){  
        logger.log(IntercutLevel, objLogInfo);  
    }
    public static void IMPayLog(Logger logger,Object objLogInfo){  
    	logger.log(IMPAYLevel, objLogInfo);  
    }
    public static void GameLog(Logger logger,Object objLogInfo){  
    	logger.log(GAMELevel, objLogInfo);  
    }

      
}  